package com.bstek.uflo.designer.model;

import com.bstek.uflo.designer.utils.JSONUtils;
import com.bstek.uflo.designer.utils.MemoryIdGenerator;

public abstract class Shape {
	
	private String id;
	
	private String $dataType;
	
	private Rectangle rectangle;
	
	private String nodeEntryId;
	
	public Shape() {
		this.id = MemoryIdGenerator.nextKey();
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Rectangle getRectangle() {
		return rectangle;
	}

	public void setRectangle(Rectangle rectangle) {
		this.rectangle = rectangle;
	}

	public String get$dataType() {
		return $dataType;
	}

	public void set$dataType(String $dataType) {
		this.$dataType = $dataType;
	}

	public String getNodeEntryId() {
		return nodeEntryId;
	}

	public void setNodeEntryId(String nodeEntryId) {
		this.nodeEntryId = nodeEntryId;
	}

	public String toJSON() {
		try {
			return JSONUtils.toJSON(this);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
